package org.microframework.cloud.logs.model.dto;

import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * API调用日志返回结果
 *
 * @author zs
 * @version 1.0.0
 * @since 2024-06-14
 */
@Data
@Schema(description = "API调用日志返回结果")
public class ApiLogDTO {
    
    @Schema(description = "日志ID")
    private String id;
    
    @Schema(description = "服务名称")
    private String serviceName;
    
    @Schema(description = "服务IP地址")
    private String serviceIp;
    
    @Schema(description = "接口名称")
    private String apiName;
    
    @Schema(description = "请求方法")
    private String method;
    
    @Schema(description = "请求路径")
    private String requestPath;
    
    @Schema(description = "请求参数")
    private String requestParams;
    
    @Schema(description = "请求头")
    private String requestHeaders;
    
    @Schema(description = "响应状态码")
    private Integer responseStatus;
    
    @Schema(description = "响应内容")
    private String responseBody;
    
    @Schema(description = "调用时长(毫秒)")
    private Long duration;
    
    @Schema(description = "调用状态（0成功 1失败）")
    private Integer status;
    
    @Schema(description = "错误信息")
    private String errorMessage;
    
    @Schema(description = "调用时间")
    private Date callTime;
    
    @Schema(description = "调用者")
    private String caller;
    
    @Schema(description = "追踪ID")
    private String traceId;
    
    @Schema(description = "创建时间")
    private Date createTime;
    
    @Schema(description = "更新时间")
    private Date updateTime;
} 